﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace Wechat.Crawler.Blog;
internal class MyDesignTimeDbContextFactory : IDesignTimeDbContextFactory<WechatDbContext>
{
    public WechatDbContext CreateDbContext(string[] args)
    {
        DbContextOptionsBuilder<WechatDbContext> builder = new();
        string connStr = "Data Source=..\\Article\\Output\\Db\\公众号系列文章合集.db";

        builder.UseSqlite(connStr);
        return new WechatDbContext(builder.Options);
    }
}

